/* 
 * Document   : foam-script
 * Created on : 16 septembre 2013, 09:23:43
 * Author     : Mamy RAKOTONIRINA
 * Description: JS for FOAM
 */

function showSynthese(id){
    // Get foamUri
    var uri = document.location.pathname;
    var foamPos = uri.lastIndexOf("foam");
    var resteUri = uri.substring(foamPos,100);
    var foamUri = uri.replace(resteUri, "foam");
    
    $.ajax({
        type: 'POST',
        url: foamUri+'/synthese/synthese/'+id,
        dataType: "html",
        cache: false,
        success: function(contenu){
            $('#dialog').html(contenu);
            $("#dialog").dialog({
                //height: '100%',
                width: '99%',
                modal: true,
                draggable: false,
                resizable: false,
                show: {
                    effect: "fade",
                    duration: 500
                },
                hide: {
                    effect: "fade",
                    duration: 500
                }
            });
        }
    });        
}